import { request } from 'umi';

// 获取所有预约配置
export async function getAllBookingSettings(params) {
  return request('/api/v1/booking/setting', {
    method: 'GET',
    params,
  });
}

// 获取门店预约配置
export async function getBookingSettingByStoreId(storeId) {
  return request(`/api/v1/booking/setting/${storeId}`, {
    method: 'GET',
  });
}

// 新增预约配置
export async function createBookingSetting(params) {
  return request('/api/v1/booking/setting', {
    method: 'PUT',
    data: params,
  });
}

// 更新预约配置
export async function updateBookingSetting(params) {
  return request('/api/v1/booking/setting', {
    method: 'PUT',
    data: params,
  });
}

// 删除预约配置
export async function deleteBookingSetting(id) {
  return request(`/api/v1/booking/setting/${id}`, {
    method: 'DELETE',
  });
}